﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using GreenyMeter.DOM.DataBaseAcces;

namespace GreenyMeter.DOM.Objets
{
    public class Products
    {




        public static DataTable getAllProductCategories()
        {

            SqlDataAcces sqlQuery = new SqlDataAcces();
            List<SqlDaAccesParameters> param = new List<SqlDaAccesParameters>();
            return sqlQuery.GetDataTable("usp_GetAllProductCategories", param);
        }

        public static DataTable getProductTypesByCategoryId(Int32 CategoryId)
        {

            SqlDataAcces sqlQuery = new SqlDataAcces();
            List<SqlDaAccesParameters> param = new List<SqlDaAccesParameters>();
            param.Add(new SqlDaAccesParameters("@ProductCategoryId", CategoryId));
            return sqlQuery.GetDataTable("usp_GetProductTypesByCategoryId", param);


        }
    }
}